﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace SyncCommon
{
    public class WINAPI
    {
        public struct COPYDATASTRUCT
        {
            public IntPtr dwData;
            public int cbData;
            [MarshalAs(UnmanagedType.LPTStr)]
            public string lpData;
        }

        public class Message
        {
            public const int WS_SHOWNORMAL = 3;
            public const int WM_OPENSEARCH = 2022;
            public const int WM_COPYDATA = 0x004A;

        }

        [DllImport("user32")]
        public static extern bool ChangeWindowMessageFilter(uint msg, int flags);
        [DllImport("User32.dll")]
        public static extern void SetForegroundWindow(IntPtr hwnd);
        [DllImport("User32.dll")]
        public static extern bool ShowWindowAsync(IntPtr hWnd, int cmdShow);

    }
}
